import numpy as np
from sklearn.linear_model import LinearRegression

x=np.array([[103],[115],[90],[89],[60],[70],[50],[45],[55],[78]])
y=np.array([[301],[344],[275],[276],[206],[210],[160],[124],[190],[235]])

model = LinearRegression()
model.fit(x,y)

y2 = model.predict(x)

mse=np.average((y2-y)**2)
rmse=np.sqrt(mse)
r2=model.score(x,y)

print("均方误差为",mse)
print("均方根误差为",rmse)
print("预测准确率为",r2)